import request from '@/utils/request-server'


// 获得文件夹列表
export function getFolderList(params) {
  return request({
    url: '/zym/backup/getFolderList',
    method: 'get',
    params
  })
}

// 全量备份
export function fullBackup(data) {
  return request({
    url: '/zym/backup/full/custom-path',
    method: 'post',
    data
  })
}

// 增量备份
export function incrementalBackup(data) {
  return request({
    url: '/zym/backup/incremental/custom-path',
    method: 'post',
    data
  })
} 

// 还原备份数据
export function restoreBackup(data) {
  return request({
    url: '/zym/backup/restore/upload',
    method: 'post',
    headers: {
      'Content-Type': 'multipart/form-data'
    },
    data
  })
}


// 获取备份数据列表
export function getBackupList(params) {
  return request({
    url: '/zym/backup/getBackupList',
    method: 'get',
    params
  })
}

//还原备份数据
export function restoreBackupById(params) {
  return request({
    url: '/zym/backup/restoreBackup',
    method: 'get',
    params
  })
} 
